<?php

	/**
	 * 
	 * @author bsuter
	 *
	 */
	Class Yomm_Library_Flickr {
		
		public $url = 'http://api.flickr.com/services/rest/?';
		
		private $_params = null;
		
		public function API($params)
		{
			$this->_params = $params;
			
			$params['format'] = 'php_serial';
			
			$encoded_params = array();

			foreach ($params as $k => $v)
			{	
				$encoded_params[] = urlencode($k).'='.urlencode($v);
			}
			
			$url = $this->url . implode('&', $encoded_params);

			$dl = new Yomm_Library_Http();
			
			$rsp = $dl->download($url);

			$rsp_obj = @unserialize($rsp);
			
			return $rsp_obj;
		}
		
	}